<?php
	/******Function : Warabi Config Class******/
	/******Author : Feifei******/
	/******Date : 12/04/2008 ****/
	require_once('class.base.php');

	class config extends base{

		function update_OneConfig($cid , $value){
			$cid = $this->safePara($cid);
			$value = $this->safePara($value);

			$obj = array(
				array("type" => ET_UPDATE),
				array(
					"value" => $value
				),
				array("id" => $cid)
			);
			$this->__set("execObj" , $obj);
			if(!$this->__updateOneResult()){
				echo "fail";
			}
			else echo "succeed";
		}

		function get_AllUser_SelectResult(){
			$obj = array(
				array("type" => ET_SELECT),
				array("id" , "property" , "value"),
				array("1"=>"1"),
				array(
					"order by id",
				)
			);
			$this->__set("execObj" , $obj);
			return $this->__getAssocResult();
		}

		function showName(){
			return $this->tableName;
		}

	}

	$config = new config("config");

?>